Delete Beneficiary by Id
The Delete Beneficiary by Id API is used to delete a beneficiary identified by their unique beneficiaryID. The legal representative with the "CanManageBeneficiary" permission can initiate the beneficiary deletion process.
Method: POST
{{URL}}/jsonrpc
Headers
Name | Value |
---|---|
Content-Type | application/json |
Example
Payload Parameters
Parameter | Description |
---|---|
beneficiaryID Mandatory | String The unique identifier of the beneficiary to be deleted Ex:"64d50c5c9735d3e922367ad4 " |
customerID Mandatory | String The unique identifier of the customer associated with the beneficiary Ex:"100000000048001 " |
- cURL
- C#
- Go
- NodeJs
curl --location 'https://wallet.netxd.com/plwallet/rpc/WalletService/DeleteBeneficiaryByID' \
--header 'DeviceID: 8020' \
--header 'Signature: keyId=8020,algorithm=ecdsa-sha256,signature=MEUCIQCNi1vjPf/HpI9R2DXnc0Zt1s6YmWyA4H1x813lJ+tuDgIgB+lrc+iCMyTUGiraG9kGKNDXYiz7RfBBtifr5wUQs54=' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic ci5hbmJhbGFnYW5AbmV0eGQuY29tOmQ0Mjc2ZmIx' \
--data '{"beneficiaryID":"64d50c5c9735d3e922367ad4","customerID":"100000000048001"}'
var options = new RestClientOptions("https://wallet.netxd.com")
{
MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("/plwallet/rpc/WalletService/DeleteBeneficiaryByID", Method.Post);
request.AddHeader("DeviceID", "8020");
request.AddHeader("Signature", "keyId=8020,algorithm=ecdsa-sha256,signature=MEUCIQCNi1vjPf/HpI9R2DXnc0Zt1s6YmWyA4H1x813lJ+tuDgIgB+lrc+iCMyTUGiraG9kGKNDXYiz7RfBBtifr5wUQs54=");
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Authorization", "Basic ci5hbmJhbGFnYW5AbmV0eGQuY29tOmQ0Mjc2ZmIx");
var body = @"{" + "\n" +
@" ""beneficiaryID"": ""64d50c5c9735d3e922367ad4""," + "\n" +
@" ""customerID"": ""100000000048001""" + "\n" +
@"}";
request.AddStringBody(body, DataFormat.Json);
RestResponse response = await client.ExecuteAsync(request);
Console.WriteLine(response.Content);
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://wallet.netxd.com/plwallet/rpc/WalletService/DeleteBeneficiaryByID"
method := "POST"
payload := strings.NewReader(`{
"beneficiaryID": "64d50c5c9735d3e922367ad4",
"customerID": "100000000048001"
}`)
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("DeviceID", "8020")
req.Header.Add("Signature", "keyId=8020,algorithm=ecdsa-sha256,signature=MEUCIQCNi1vjPf/HpI9R2DXnc0Zt1s6YmWyA4H1x813lJ+tuDgIgB+lrc+iCMyTUGiraG9kGKNDXYiz7RfBBtifr5wUQs54=")
req.Header.Add("Content-Type", "application/json")
req.Header.Add("Authorization", "Basic ci5hbmJhbGFnYW5AbmV0eGQuY29tOmQ0Mjc2ZmIx")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
var https = require('follow-redirects').https;
var fs = require('fs');
var options = {
'method': 'POST',
'hostname': 'wallet.netxd.com',
'path': '/plwallet/rpc/WalletService/DeleteBeneficiaryByID',
'headers': {
'DeviceID': '8020',
'Signature': 'keyId=8020,algorithm=ecdsa-sha256,signature=MEUCIQCNi1vjPf/HpI9R2DXnc0Zt1s6YmWyA4H1x813lJ+tuDgIgB+lrc+iCMyTUGiraG9kGKNDXYiz7RfBBtifr5wUQs54=',
'Content-Type': 'application/json',
'Authorization': 'Basic ci5hbmJhbGFnYW5AbmV0eGQuY29tOmQ0Mjc2ZmIx'
},
'maxRedirects': 20
};
var req = https.request(options, function (res) {
var chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function (chunk) {
var body = Buffer.concat(chunks);
console.log(body.toString());
});
res.on("error", function (error) {
console.error(error);
});
});
var postData = JSON.stringify({
"beneficiaryID": "64d50c5c9735d3e922367ad4",
"customerID": "100000000048001"
});
req.write(postData);
req.end();
Body
{
"beneficiaryID": "64d50c5c9735d3e922367ad4",
"customerID": "100000000048001"
}
Response: 200
Response Parameters
Parameter | Description |
---|---|
id | String Unique identifier of the ticket Ex:"350006 " |
requestID | String Identifier for the request Ex:"350005 " |
customerID | String Unique identifier of the customer Ex:"100000000048001 " |
applicationCode | String Application code associated with the ticket Ex:"PL " |
ticketName | String Name of the ticket Ex:"DELETE_BENEFICIARY " |
createdTS | String Timestamp when the ticket was created Ex:"2023-08-10T21:44:08.270770495+05:30 " |
updatedTS | String Timestamp of the last update to the ticket Ex:"2023-08-10T21:44:08.27077056+05:30 " |
createdBy | String User who created the ticket Ex:"chennareddy.s+102@netxd.com " |
payloadJSON | Object |
ID | String Unique identifier of the beneficiary entry Ex:"64d50c5c9735d3e922367ad4 " |
createdDate | String Timestamp when the beneficiary entry was created Ex:"2023-08-10T16:12:12.198Z " |
updatedDate | String Timestamp of the last update Ex:"0001-01-01T00:00:00Z " |
type | String Type of beneficiary Ex:"BUSINESS","INDIVIDUAL " |
firstName | String First name of the beneficiary Ex:"Reddygari " |
lastName | String Last name of the beneficiary Ex:"ChennReddy " |
accountType | String Account type Ex:"DIGITALASSET " |
contact | Object |
String Email address of the beneficiary Ex:"chennareddy.s+099@netxd.com " | |
phoneNumber | String Phone number of the beneficiary Ex:"1212144555 " |
address | Object |
line1 | String Address line 1 Ex:"alaska " |
city | String City of the beneficiary's address Ex:"Seattle " |
state | String State of the beneficiary's address Ex:"WA " |
country | String Country of the beneficiary's address Ex:"US" |
zipCode | String Zip code of the beneficiary's address Ex:"98104 " |
createdBy | String Email address of the user who created the beneficiary entry Ex:"chennareddy.s+102@netxd.com " |
accountId | String Account ID of the beneficiary Ex:"2345001 " |
status | String Status of ticket Ex:"INACTIVE " |
customerID | String Unique identifier of the customer associated with the beneficiary Ex:"100000000048001 " |
publicKey | String Public key associated with the beneficiary Ex:"GDIP6LFGGED5INT6ZIG3CPYLMXE7KZPYXF7P6IVLM6JEDOGI4ORZVVFH " |
network | String Network associated with the beneficiary Ex:"11 " |
beneficiaryAccountDetails | Object |
accountId | String Account ID of the beneficiary Ex:"2345001 " |
accountName | String Name of the beneficiary's account Ex:"Sadowtest12 " |
customerID | String Unique identifier of the customer associated with the beneficiary Ex:"100000000048001 " |
customerName | String Name of the customer associated with the beneficiary Ex:"NETXDNETXD " |
updateHistory | Array |
userName | String email address of the user for this update Ex:"chennareddy.s+106@netxd.com " |
updatedDate | String The timestamp when the ticket was last updated Ex:"2023-08-10T16:12:53.367Z " |
state | String The current state of the ticket Ex:"OPEN " |
status | String The status of the ticket Ex:"WAITING_FOR_APPROVAL " |
noOfApproval | String The number of approvals required for the ticket to be completed Ex:"1 " |
ticketHistory | Array |
updatedBy | String The email address of the user who performed the update Ex:"chennareddy.s+102@netxd.com " |
updatedDate | String The timestamp when the update occurred Ex:"2023-08-10T21:44:08.271217372+05:30 " |
state | String The state of the ticket after the update Ex:"OPEN " |
{
"id": "350006",
"requestID": "350005",
"customerID": "100000000048001",
"applicationCode": "PL",
"ticketName": "DELETE_BENEFICIARY",
"createdTS": "2023-08-10T21:44:08.270770495+05:30",
"updatedTS": "2023-08-10T21:44:08.27077056+05:30",
"createdBy": "chennareddy.s+102@netxd.com",
"payloadJSON": {
"ID": "64d50c5c9735d3e922367ad4",
"createdDate": "2023-08-10T16:12:12.198Z",
"updatedDate": "0001-01-01T00:00:00Z",
"type": "INDIVIDUAL",
"firstName": "Reddygari",
"lastName": "ChennReddy",
"accountType": "DIGITALASSET",
"contact": {
"email": "chennareddy.s+099@netxd.com",
"phoneNumber": "1212144555"
},
"address": {
"line1": "edit test",
"city": "Seattle",
"state": "WA",
"country": "US",
"zipCode": "98104"
},
"createdBy": "chennareddy.s+102@netxd.com",
"accountId": "2345001",
"status": "INACTIVE",
"customerID": "100000000048001",
"publicKey": "GDIP6LFGGED5INT6ZIG3CPYLMXE7KZPYXF7P6IVLM6JEDOGI4ORZVVFH",
"network": "11",
"beneficiaryAccountDetails": {
"accountId": "2345001",
"accountName": "Sadowtest12",
"customerID": "100000000048001",
"customerName": "NETXDNETXD"
},
"updateHistory": [
{
"userName": "chennareddy.s+106@netxd.com",
"updatedDate": "2023-08-10T16:12:53.367Z"
},
{
"userName": "chennareddy.s+102@netxd.com",
"updatedDate": "2023-08-10T16:13:34.653Z"
}
]
},
"state": "OPEN",
"status": "WAITING_FOR_APPROVAL",
"noOfApproval": 1,
"ticketHistory": [
{
"updatedBy": "chennareddy.s+102@netxd.com",
"updatedDate": "2023-08-10T21:44:08.271217372+05:30",
"state": "OPEN"
}
]
}